<template>
  <div class="app-container">
  
    <el-card shadow="hover" class="data-table">
      
      <el-table
        v-loading="loading"
        :data="Lists"
        row-key="id"
        default-expand-all
        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
        class="data-table__content"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column prop="id" label="序号" />
        <el-table-column prop="id" label="Id"  />
        <el-table-column prop="account" label="用户名"  />
        <el-table-column prop="level" label="广告商等级"  />
        <el-table-column prop="createTime" label="开通时间" width="220" />

        
      </el-table>
    </el-card>

  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: "广告商管理",
  inheritAttrs: false,
});

import MemberAPI, {   ListVO } from "@/api/system/member.api";

// const queryFormRef = ref();

const loading = ref(false);
const selectIds = ref<number[]>([]);
const queryParams = reactive<any>({});


const Lists = ref<ListVO[]>();


// 查询
function handleQuery() {
  console.log(queryParams)
  loading.value = true;

  Lists.value =  [
    {
      id:"1",
      account: "张三",
      sort:1,
      createTime:"2023-10-10 10:00:00",
      money:"100",
      level:"黄金会员",
    },
    {
      id:"2",
      account: "李四",
      sort:2,
      createTime:"2023-10-10 10:00:00",
      money:"200",
      level:"黄金会员",
    },
    {
      id:"3",
      account: "王五",
      sort:3,
      createTime:"2023-10-10 10:00:00",
      money:"300",
      level:"黄金会员",
    }
  ]
  loading.value = false;
}

// 重置查询
// function handleResetQuery() {
//   queryFormRef.value.resetFields();
//   handleQuery();
// }

// 处理选中项变化
function handleSelectionChange(selection: any) {
  selectIds.value = selection.map((item: any) => item.id);
}




onMounted(() => {
  handleQuery();
});
</script>
